package com.example.community.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.community.dao.pojo.DiscussPost;
import org.apache.ibatis.annotations.Options;

import java.util.List;

public interface DiscussPostService {

    List<DiscussPost> selectDiscussPosts(int userId, int offset, int limit);
    
    Page<DiscussPost> getDiscussPostsPage(Integer page);

    int findDiscussPostRows(int i);

    @Options(useGeneratedKeys = true,keyColumn = "id",keyProperty = "id")
    void insertDiscussPost(DiscussPost discussPost);

    DiscussPost findDiscussPostById(int DiscussPostId);

    int updateCommentCount(int id, int commentCount);

    //0-普通; 1-置顶;
    int updateType(int postId,int type);
    //0-正常; 1-精华; 2-拉黑;
    int updateStatus(int postId,int status);
}
